Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.Nikola: fix tests #95549

Closed
wants to merge 1 commit into from
Closed

Conversation

cript0nauta
Copy link
Contributor

  • Use pytest tests/ instead of pytest . to fix a relative import error
  • Apply a patch to fix markdown compilation tests
  • Remove a patch to requirements.txt not needed anymore
Motivation for this change

The build of Nikola was failing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

- Use "pytest tests/" instead of "pytest ." to fix a relative import
  error
- Apply a patch to fix markdown compilation tests
- Remove a patch to requirements.txt not needed anymore
Comment on lines +19 to +22
-<span class="kn">from</span> <span class="nn">this</span>
-</pre>
+<code><span class="kn">from</span> <span class="nn">this</span>
+</code></pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's nothing nix specific here, probably should make a patch against upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already fixed in upstream (from version 8.1.0 onwards). So an option to prevent including this would be to upgrade to the latest version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option is to use fetchpatch, here an example: https://github.com/NixOS/nixpkgs/pull/95524/files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seconded - change this to a fetchpatch of the relevant upstream commit (for a github commit you can usually just add .patch to the end of the url) and I'll review this.

@cript0nauta
Copy link
Contributor Author

Update on this PR: I think I'll open a new PR upgrading Nikola. This avoids having to use a custom patch as done in the current PR.

Right now, building Nikola in master fails because piexif, one of its dependencies, fails too. hMatoba/Piexif#108 describes the problem. I'm waiting for a response to that issue in order to proceed.

@jonringer
Copy link
Contributor

you can also just force push to this branch

@doronbehar
Copy link
Contributor

Current Nikola in nixpkgs is updated and this PR is not needed anymore.

@doronbehar doronbehar closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants